3.15.95 \(\int \sec ^2(c+d x) (a+b \sin (c+d x))^2 \tan ^3(c+d x) \, dx\) [1495]

3.15.95.1 Optimal result
3.15.95.2 Mathematica [A] (verified)
3.15.95.3 Rubi [A] (verified)
3.15.95.4 Maple [A] (verified)
3.15.95.5 Fricas [A] (verification not implemented)
3.15.95.6 Sympy [F(-1)]
3.15.95.7 Maxima [A] (verification not implemented)
3.15.95.8 Giac [A] (verification not implemented)
3.15.95.9 Mupad [B] (verification not implemented)

3.15.95.1 Optimal result

Integrand size = 29, antiderivative size = 116 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^2 \tan ^3(c+d x) \, dx=-\frac {b (3 a+4 b) \log (1-\sin (c+d x))}{8 d}+\frac {(3 a-4 b) b \log (1+\sin (c+d x))}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^2}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x)) (2 a+3 b \sin (c+d x))}{4 d} \]

output
-1/8*b*(3*a+4*b)*ln(1-sin(d*x+c))/d+1/8*(3*a-4*b)*b*ln(1+sin(d*x+c))/d+1/4 
*sec(d*x+c)^4*(a+b*sin(d*x+c))^2/d-1/4*sec(d*x+c)^2*(a+b*sin(d*x+c))*(2*a+ 
3*b*sin(d*x+c))/d
 
3.15.95.2 Mathematica [A] (verified)

Time = 0.27 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.21 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {3 a b \text {arctanh}(\sin (c+d x))}{4 d}+\frac {3 a b \sec (c+d x) \tan (c+d x)}{4 d}-\frac {3 a b \sec ^3(c+d x) \tan (c+d x)}{2 d}+\frac {2 a b \sec (c+d x) \tan ^3(c+d x)}{d}+\frac {a^2 \tan ^4(c+d x)}{4 d}-\frac {b^2 \left (4 \log (\cos (c+d x))+2 \tan ^2(c+d x)-\tan ^4(c+d x)\right )}{4 d} \]

input
Integrate[Sec[c + d*x]^2*(a + b*Sin[c + d*x])^2*Tan[c + d*x]^3,x]
 
output
(3*a*b*ArcTanh[Sin[c + d*x]])/(4*d) + (3*a*b*Sec[c + d*x]*Tan[c + d*x])/(4 
*d) - (3*a*b*Sec[c + d*x]^3*Tan[c + d*x])/(2*d) + (2*a*b*Sec[c + d*x]*Tan[ 
c + d*x]^3)/d + (a^2*Tan[c + d*x]^4)/(4*d) - (b^2*(4*Log[Cos[c + d*x]] + 2 
*Tan[c + d*x]^2 - Tan[c + d*x]^4))/(4*d)
 
3.15.95.3 Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.24, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.379, Rules used = {3042, 3316, 27, 531, 27, 2176, 25, 27, 452, 219, 240}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \tan ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (c+d x)^3 (a+b \sin (c+d x))^2}{\cos (c+d x)^5}dx\)

\(\Big \downarrow \) 3316

\(\displaystyle \frac {b^5 \int \frac {\sin ^3(c+d x) (a+b \sin (c+d x))^2}{\left (b^2-b^2 \sin ^2(c+d x)\right )^3}d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b^2 \int \frac {b^3 \sin ^3(c+d x) (a+b \sin (c+d x))^2}{\left (b^2-b^2 \sin ^2(c+d x)\right )^3}d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 531

\(\displaystyle \frac {b^2 \left (\frac {\int -\frac {2 (a+b \sin (c+d x)) \left (2 \sin ^2(c+d x) b^4+b^4+2 a \sin (c+d x) b^3\right )}{\left (b^2-b^2 \sin ^2(c+d x)\right )^2}d(b \sin (c+d x))}{4 b^2}+\frac {b^2 (a+b \sin (c+d x))^2}{4 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}\right )}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b^2 \left (\frac {b^2 (a+b \sin (c+d x))^2}{4 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}-\frac {\int \frac {(a+b \sin (c+d x)) \left (2 \sin ^2(c+d x) b^4+b^4+2 a \sin (c+d x) b^3\right )}{\left (b^2-b^2 \sin ^2(c+d x)\right )^2}d(b \sin (c+d x))}{2 b^2}\right )}{d}\)

\(\Big \downarrow \) 2176

\(\displaystyle \frac {b^2 \left (\frac {b^2 (a+b \sin (c+d x))^2}{4 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}-\frac {\frac {\int -\frac {b^4 (3 a+4 b \sin (c+d x))}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))}{2 b^2}+\frac {b^2 (a+b \sin (c+d x)) (2 a+3 b \sin (c+d x))}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}}{2 b^2}\right )}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {b^2 \left (\frac {b^2 (a+b \sin (c+d x))^2}{4 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}-\frac {\frac {b^2 (a+b \sin (c+d x)) (2 a+3 b \sin (c+d x))}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {\int \frac {b^4 (3 a+4 b \sin (c+d x))}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))}{2 b^2}}{2 b^2}\right )}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b^2 \left (\frac {b^2 (a+b \sin (c+d x))^2}{4 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}-\frac {\frac {b^2 (a+b \sin (c+d x)) (2 a+3 b \sin (c+d x))}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {1}{2} b^2 \int \frac {3 a+4 b \sin (c+d x)}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))}{2 b^2}\right )}{d}\)

\(\Big \downarrow \) 452

\(\displaystyle \frac {b^2 \left (\frac {b^2 (a+b \sin (c+d x))^2}{4 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}-\frac {\frac {b^2 (a+b \sin (c+d x)) (2 a+3 b \sin (c+d x))}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {1}{2} b^2 \left (3 a \int \frac {1}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))+4 \int \frac {b \sin (c+d x)}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))\right )}{2 b^2}\right )}{d}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {b^2 \left (\frac {b^2 (a+b \sin (c+d x))^2}{4 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}-\frac {\frac {b^2 (a+b \sin (c+d x)) (2 a+3 b \sin (c+d x))}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {1}{2} b^2 \left (4 \int \frac {b \sin (c+d x)}{b^2-b^2 \sin ^2(c+d x)}d(b \sin (c+d x))+\frac {3 a \text {arctanh}(\sin (c+d x))}{b}\right )}{2 b^2}\right )}{d}\)

\(\Big \downarrow \) 240

\(\displaystyle \frac {b^2 \left (\frac {b^2 (a+b \sin (c+d x))^2}{4 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}-\frac {\frac {b^2 (a+b \sin (c+d x)) (2 a+3 b \sin (c+d x))}{2 \left (b^2-b^2 \sin ^2(c+d x)\right )}-\frac {1}{2} b^2 \left (\frac {3 a \text {arctanh}(\sin (c+d x))}{b}-2 \log \left (b^2-b^2 \sin ^2(c+d x)\right )\right )}{2 b^2}\right )}{d}\)

input
Int[Sec[c + d*x]^2*(a + b*Sin[c + d*x])^2*Tan[c + d*x]^3,x]
 
output
(b^2*((b^2*(a + b*Sin[c + d*x])^2)/(4*(b^2 - b^2*Sin[c + d*x]^2)^2) - (-1/ 
2*(b^2*((3*a*ArcTanh[Sin[c + d*x]])/b - 2*Log[b^2 - b^2*Sin[c + d*x]^2])) 
+ (b^2*(a + b*Sin[c + d*x])*(2*a + 3*b*Sin[c + d*x]))/(2*(b^2 - b^2*Sin[c 
+ d*x]^2)))/(2*b^2)))/d
 

3.15.95.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 240
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x 
^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
 

rule 452
Int[((c_) + (d_.)*(x_))/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[c   Int[1/ 
(a + b*x^2), x], x] + Simp[d   Int[x/(a + b*x^2), x], x] /; FreeQ[{a, b, c, 
 d}, x] && NeQ[b*c^2 + a*d^2, 0]
 

rule 531
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symb 
ol] :> With[{Qx = PolynomialQuotient[x^m, a + b*x^2, x], e = Coeff[Polynomi 
alRemainder[x^m, a + b*x^2, x], x, 0], f = Coeff[PolynomialRemainder[x^m, a 
 + b*x^2, x], x, 1]}, Simp[(c + d*x)^n*(a*f - b*e*x)*((a + b*x^2)^(p + 1)/( 
2*a*b*(p + 1))), x] + Simp[1/(2*a*b*(p + 1))   Int[(c + d*x)^(n - 1)*(a + b 
*x^2)^(p + 1)*ExpandToSum[2*a*b*(p + 1)*(c + d*x)*Qx - a*d*f*n + b*c*e*(2*p 
 + 3) + b*d*e*(n + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGt 
Q[n, 0] && IGtQ[m, 0] && LtQ[p, -1] && GtQ[n, 1] && IntegerQ[2*p]
 

rule 2176
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] : 
> With[{Qx = PolynomialQuotient[Pq, a + b*x^2, x], R = Coeff[PolynomialRema 
inder[Pq, a + b*x^2, x], x, 0], S = Coeff[PolynomialRemainder[Pq, a + b*x^2 
, x], x, 1]}, Simp[(d + e*x)^m*(a + b*x^2)^(p + 1)*((a*S - b*R*x)/(2*a*b*(p 
 + 1))), x] + Simp[1/(2*a*b*(p + 1))   Int[(d + e*x)^(m - 1)*(a + b*x^2)^(p 
 + 1)*ExpandToSum[2*a*b*(p + 1)*(d + e*x)*Qx - a*e*S*m + b*d*R*(2*p + 3) + 
b*e*R*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, d, e}, x] && PolyQ[Pq, x 
] && NeQ[b*d^2 + a*e^2, 0] && LtQ[p, -1] && GtQ[m, 0] &&  !(IGtQ[m, 0] && R 
ationalQ[a, b, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
3.15.95.4 Maple [A] (verified)

Time = 0.64 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.17

method result size
derivativedivides \(\frac {\frac {a^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+2 a b \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+b^{2} \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(136\)
default \(\frac {\frac {a^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+2 a b \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+b^{2} \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(136\)
parallelrisch \(\frac {16 b^{2} \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-12 b \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a +\frac {4 b}{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+12 b \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a -\frac {4 b}{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (-4 a^{2}-4 b^{2}\right ) \cos \left (2 d x +2 c \right )+\left (a^{2}+3 b^{2}\right ) \cos \left (4 d x +4 c \right )+6 a b \sin \left (d x +c \right )-10 a b \sin \left (3 d x +3 c \right )+3 a^{2}+b^{2}}{4 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) \(225\)
risch \(i b^{2} x +\frac {2 i b^{2} c}{d}+\frac {i \left (4 i a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+8 i b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+5 a b \,{\mathrm e}^{7 i \left (d x +c \right )}+8 i b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-3 a b \,{\mathrm e}^{5 i \left (d x +c \right )}+4 i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+8 i b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+3 a b \,{\mathrm e}^{3 i \left (d x +c \right )}-5 a b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{2 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a b}{4 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a b}{4 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{d}\) \(248\)
norman \(\frac {\frac {\left (4 a^{2}+4 b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (4 a^{2}+4 b^{2}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 b^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 b^{2} \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 \left (2 a^{2}+3 b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {3 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}+\frac {5 a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {15 a b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {15 a b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {5 a b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {3 a b \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {b^{2} \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {b \left (3 a -4 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{4 d}-\frac {b \left (3 a +4 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{4 d}\) \(328\)

input
int(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 
output
1/d*(1/4*a^2*sin(d*x+c)^4/cos(d*x+c)^4+2*a*b*(1/4*sin(d*x+c)^5/cos(d*x+c)^ 
4-1/8*sin(d*x+c)^5/cos(d*x+c)^2-1/8*sin(d*x+c)^3-3/8*sin(d*x+c)+3/8*ln(sec 
(d*x+c)+tan(d*x+c)))+b^2*(1/4*tan(d*x+c)^4-1/2*tan(d*x+c)^2-ln(cos(d*x+c)) 
))
 
3.15.95.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.09 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {{\left (3 \, a b - 4 \, b^{2}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 4 \, {\left (a^{2} + 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, a^{2} + 2 \, b^{2} - 2 \, {\left (5 \, a b \cos \left (d x + c\right )^{2} - 2 \, a b\right )} \sin \left (d x + c\right )}{8 \, d \cos \left (d x + c\right )^{4}} \]

input
integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="frica 
s")
 
output
1/8*((3*a*b - 4*b^2)*cos(d*x + c)^4*log(sin(d*x + c) + 1) - (3*a*b + 4*b^2 
)*cos(d*x + c)^4*log(-sin(d*x + c) + 1) - 4*(a^2 + 2*b^2)*cos(d*x + c)^2 + 
 2*a^2 + 2*b^2 - 2*(5*a*b*cos(d*x + c)^2 - 2*a*b)*sin(d*x + c))/(d*cos(d*x 
 + c)^4)
 
3.15.95.6 Sympy [F(-1)]

Timed out. \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\text {Timed out} \]

input
integrate(sec(d*x+c)**5*sin(d*x+c)**3*(a+b*sin(d*x+c))**2,x)
 
output
Timed out
 
3.15.95.7 Maxima [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.06 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {{\left (3 \, a b - 4 \, b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (3 \, a b + 4 \, b^{2}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + \frac {2 \, {\left (5 \, a b \sin \left (d x + c\right )^{3} - 3 \, a b \sin \left (d x + c\right ) + 2 \, {\left (a^{2} + 2 \, b^{2}\right )} \sin \left (d x + c\right )^{2} - a^{2} - 3 \, b^{2}\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{8 \, d} \]

input
integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="maxim 
a")
 
output
1/8*((3*a*b - 4*b^2)*log(sin(d*x + c) + 1) - (3*a*b + 4*b^2)*log(sin(d*x + 
 c) - 1) + 2*(5*a*b*sin(d*x + c)^3 - 3*a*b*sin(d*x + c) + 2*(a^2 + 2*b^2)* 
sin(d*x + c)^2 - a^2 - 3*b^2)/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1))/d
 
3.15.95.8 Giac [A] (verification not implemented)

Time = 0.42 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.12 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {{\left (3 \, a b - 4 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - {\left (3 \, a b + 4 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (3 \, b^{2} \sin \left (d x + c\right )^{4} + 5 \, a b \sin \left (d x + c\right )^{3} + 2 \, a^{2} \sin \left (d x + c\right )^{2} - 2 \, b^{2} \sin \left (d x + c\right )^{2} - 3 \, a b \sin \left (d x + c\right ) - a^{2}\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{8 \, d} \]

input
integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c))^2,x, algorithm="giac" 
)
 
output
1/8*((3*a*b - 4*b^2)*log(abs(sin(d*x + c) + 1)) - (3*a*b + 4*b^2)*log(abs( 
sin(d*x + c) - 1)) + 2*(3*b^2*sin(d*x + c)^4 + 5*a*b*sin(d*x + c)^3 + 2*a^ 
2*sin(d*x + c)^2 - 2*b^2*sin(d*x + c)^2 - 3*a*b*sin(d*x + c) - a^2)/(sin(d 
*x + c)^2 - 1)^2)/d
 
3.15.95.9 Mupad [B] (verification not implemented)

Time = 12.31 (sec) , antiderivative size = 247, normalized size of antiderivative = 2.13 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (\frac {3\,a\,b}{4}-b^2\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (b^2+\frac {3\,a\,b}{4}\right )}{d}+\frac {b^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {2\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (4\,a^2+8\,b^2\right )+2\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-\frac {11\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}-\frac {11\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{2}+\frac {3\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{2}+\frac {3\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]

input
int((sin(c + d*x)^3*(a + b*sin(c + d*x))^2)/cos(c + d*x)^5,x)
 
output
(log(tan(c/2 + (d*x)/2) + 1)*((3*a*b)/4 - b^2))/d - (log(tan(c/2 + (d*x)/2 
) - 1)*((3*a*b)/4 + b^2))/d + (b^2*log(tan(c/2 + (d*x)/2)^2 + 1))/d - (2*b 
^2*tan(c/2 + (d*x)/2)^2 - tan(c/2 + (d*x)/2)^4*(4*a^2 + 8*b^2) + 2*b^2*tan 
(c/2 + (d*x)/2)^6 - (11*a*b*tan(c/2 + (d*x)/2)^3)/2 - (11*a*b*tan(c/2 + (d 
*x)/2)^5)/2 + (3*a*b*tan(c/2 + (d*x)/2)^7)/2 + (3*a*b*tan(c/2 + (d*x)/2))/ 
2)/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x) 
/2)^6 + tan(c/2 + (d*x)/2)^8 + 1))